// Flutter imports:
import 'package:flutter/material.dart';

// Package imports:
import 'package:get/get.dart';

// Project imports:
import 'package:palmf_hid/common/values/values.dart';

Widget logoutWidget({
  required Function onSelect,
  required Function onCancel,
  String? title,
  String? fucName,
}) {
  return Container(
    margin: const EdgeInsets.all(15),
    decoration: const BoxDecoration(
        color: MyColor.c_FFFFFFFF,
        borderRadius: BorderRadius.all(Radius.circular(15))),
    height: 180,
    child: Column(
      children: [
        const SizedBox(
          height: 20,
        ),
        Padding(
            padding: const EdgeInsets.symmetric(horizontal: 20),
            child: Text(title ?? "",
                style: const TextStyle(
                    color: MyColor.head_text_color, fontSize: 12))),
        const SizedBox(
          height: 20,
        ),
        const Divider(
          height: 1,
          color: Colors.black54,
        ),
        InkWell(
          child: Container(
            alignment: Alignment.center,
            padding: const EdgeInsets.symmetric(vertical: 15),
            child: Text(
              fucName ?? "",
              style: const TextStyle(color: MyColor.error_color, fontSize: 16),
            ),
          ),
          onTap: () {
            onSelect();
          },
        ),
        const Divider(
          height: 1,
          color: Colors.black54,
        ),
        InkWell(
          child: Container(
            alignment: Alignment.center,
            padding: const EdgeInsets.symmetric(vertical: 15),
            child:
                Text("cancel".tr, style: TextStyle(color: Colors.grey, fontSize: 14)),
          ),
          onTap: () {
            onCancel();
          },
        )
      ],
    ),
  );
}
